package com.hfi.security.core.validate.code;

import org.springframework.web.bind.ServletRequestBindingException;
import org.springframework.web.context.request.ServletWebRequest;

import java.io.IOException;

/**
 * @author ChangLiang
 * @date 2019/8/14
 */
public interface ValidateCodeProcessor {

    /**
     * 创建验证码
     * @param request
     * @throws IOException
     * @throws ServletRequestBindingException
     */
    void create(ServletWebRequest request) throws IOException, ServletRequestBindingException;

    /**
     * 校验验证码
     * @param request
     */
    void validate(ServletWebRequest request);
}
